<template>
    <div>
        <!-- 法人 -->
            <template v-for="(domain, index) in cData.fList">
                <table class="table_detail" style="width: 100%;margin-bottom:15px">
                        <tr> <td colspan="5" class="headColor"> <span>转让方基本情况( 法人 )</span></td></tr>
                        <tr>
                            <td rowspan="9" class="showC headColor"><span>标的企业基本情况</span></td>
                        </tr>
                        <tr v-for="(v,i) in firstInfo"  v-if="v.show == 1">
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td class="normalC"><span>{{domain[v.model]}}</span></td>
                            <td class="headColor"><span>{{ v.name2 }}</span></td>
                            <td class="normalC"><span>{{domain[v.model2]}}</span></td>
                        </tr>
                        <tr v-else>
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td colspan="3" class="normalC"><span>{{domain[v.model]}}</span></td>
                        </tr>
                        <tr>
                            <td rowspan="10" class="showC headColor"><span>产权转让行为决策及批准情况</span></td>
                        </tr>
                        </tr>
                        <tr v-for="(v,i) in secondInfo" >
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td colspan="3" class="normalC"><span>{{domain[v.model]}}</span></td>
                        </tr>                                                                                                                                                                     
                </table>
            </template> 
             <!-- 非法人 -->
             <template v-for="(domain, index) in cData.ffList"> 
                <table class="table_detail" style="width: 100%;margin-bottom:15px">
                        <tr> <td colspan="5" class="headColor"> <span>转让方基本情况(非法人)</span></td></tr>
                        <tr>
                            <td rowspan="8" class="showC headColor"><span>标的企业基本情况</span></td>
                        </tr>
                        <tr v-for="(v,i) in f_firstInfo"  v-if="v.show == 1">
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td class="normalC"><span>{{domain[v.model]}}</span></td>
                            <td class="headColor"><span>{{ v.name2 }}</span></td>
                            <td class="normalC"><span>{{domain[v.model2]}}</span></td>
                        </tr>
                        <tr  v-else>
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td colspan="3" class="normalC"><span>{{domain[v.model]}}</span></td>
                        </tr>
                        <tr>
                            <td rowspan="10" class="showC headColor"><span>产权转让行为决策及批准情况</span></td>
                        </tr>
                        <tr v-for="(v,it) in secondInfo" :key="v.cid">
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td colspan="3" class="normalC"><span>{{domain[v.model]}}</span></td>
                        </tr>                                                                                                                                                                     
                </table>
            </template> 
            <!-- 自然人 -->
            <template v-for="(domain, index) in cData.zList"> 
                <table class="table_detail" style="width: 100%;margin-bottom:15px">
                        <tr> <td colspan="5" class="headColor"> <span>转让方基本情况(自然人)</span></td></tr>
                        <tr>
                            <td rowspan="8" class="showC headColor"><span>标的企业基本情况</span></td>
                        </tr>
                        <tr v-for="(v,i) in z_firstInfo" :key="i" v-if="v.show == 1">
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td class="normalC"><span>{{domain[v.model]}}</span></td>
                            <td class="headColor"><span>{{ v.name2 }}</span></td>
                            <td class="normalC"><span>{{domain[v.model2]}}</span></td>
                        </tr>
                        <tr  v-else>
                            <td class="headColor"><span>{{ v.name }}</span></td>
                            <td colspan="3" class="normalC"><span>{{domain[v.model]}}</span></td>
                        </tr>                                                                                                                                                                    
                </table>  
            </template>         

    </div>
</template>

<script>
    export default {
        props:{
            // cText:'',
            cData:'',
            // cCol:'',
        },
        watch: {
            cData(newValue, oldValue) {
                this.dynamicValidateForm = {
                    domains: newValue.fList,//法人
                    domains1: newValue.ffList,//非法人
                    domains2: newValue.zList,//自然人
                }
            }
        },        
        data() {
            return {
                dynamicValidateForm:[],   
                 secondInfo:[{
                    name:'转让方决策文件类型',
                    cid:"111",
                    col:"name",
                    model:"decisionType"
                },{
                    name:'转让方决策文件名称及文号',
                    cid:"112",
                    col:"name",
                    model:"fileAndDocument"
                },{
                    name:'监管机构',
                    cid:"113",
                    col:"name",
                    model:"regulatoryAuthority"
                },{
                    name:'国家出资企业或主管部门',
                    cid:"114",
                    col:"name",
                    model:"competentDepartment"
                },{
                    name:'统一社会信用代码',
                    cid:"115",
                    col:"name",
                    model:"unifiedSocialCreditCode2"
                },{
                    name:'批准单位',
                    cid:"116",
                    col:"name",
                    model:"authority"
                },{
                    name:'批准日期',
                    cid:"117",
                    col:"name",
                    model:"approvalDate"
                },{
                    name:'批准文件类型',
                    cid:"118",
                    col:"name",
                    model:"approvedFileType"
                },{
                    name:'批准文件名称及文号',
                    cid:"119",
                    col:"name",
                    model:"approveFileAndDocument"
                }],            
                 firstInfo:[{
                    name:'转让方名称',
                    show:3,
                    model:"transferorName"
                },{
                    name:'住所',
                    show:3,
                    model:"residence"
                },{
                    name:'法定代表人（负责人）',
                    name2:'成立日期',
                    show:1,
                    model:"legal",
                    model2:"establisheDate"
                },{
                    name:'注册资本',
                    name2:'实收资本',
                    show:1,
                    model:"registeredCapital",
                    model2:"paidCapital"                    
                },{
                    name:'企业类型',
                    name2:'所属行业',
                    show:1,
                    model:"enterpriseType",
                    model2:"industry"                      
                },{
                    name:'经营规模',
                    name2:'统一社会信用代码',
                    show:1,
                    model:"businessScale",
                    model2:"unifiedSocialCreditCode"                           
                },{
                    name:'经济类型',
                    show:3,
                    model:"economicType",
                },{
                    name:'持有产(股)权比例（%）',
                    name2:'拟转让产(股)权比例（%）',
                    show:1,
                    model:"propertyOwnership",
                    model2:"transferreProperty"                     
                }],   
                f_firstInfo:[{
                    name:'转让方名称',
                    show:3,
                    model:"transferorName"
                },{
                    name:'主要经营场所',
                    show:3,
                    model:"mainBusinesPremise"
                },{
                    name:'负责人',
                    name2:'成立日期',
                    show:1,
                    model:"principal",
                    model2:"establisheDate"
                },{
                    name:'企业类型',
                    name2:'所属行业',
                    show:1,
                    model:"enterpriseType",
                    model2:"industry",
                },{
                    name:'统一社会信用代码',
                    show:3,
                    model:"unifiedSocialCreditCode"
                },{
                    name:'经济类型',
                    show:3,
                    model:"economicType"
                },{
                    name:'持有产(股)权比例（%）',
                    name2:'拟转让产(股)权比例（%）',
                    show:1,
                    model:"propertyOwnership",
                    model2:"transferreProperty"                    
                }],
                z_firstInfo:[{
                    name:'转让方名称',
                    show:3,
                    model:"transferorName"
                },{
                    name:'证件类型',
                    name2:'证件号码',
                    show:1,
                    model:"certificateType",
                    model2:"certificateNum"
                },{
                    name:'持有产（股）权比例（%）',
                    name2:'拟转让产(股)权比例（%）',
                    show:1,
                    model:"propertyOwnership",
                    model2:"transferreProperty"                   
                }],        
            }
        },
    }
</script>

<style scoped>
    .normalC{ background-color: #ffffff !important;}
    .showC{ background-color: #f5f5f5 !important;}
    .table_detail td:nth-child(odd) {
        width: 240px;
        height: 40px;
        background-color: #f5f5f5;
        flex: none;
    }    
    
</style>